package cn.tedu._03vehice.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import javax.websocket.server.PathParam;

@Data
public class UserRegParam {
//    @NotNull(message = "用户名不能为null")
//    @NotEmpty(message = "用户名不能为null或空字符串")
//    @NotBlank(message = "用户名不能为null或空字符串或空白串")
//    @Size(min = 6, max = 10, message = "用户名必须在6到10位之间")
    @Pattern(regexp = "^(?:[a-zA-Z]{1,14}|[\\u4e00-\\u9fa5]{1,7})$", message = "用户名最长14个英文或7个中文")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    private String password;
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;
    @ApiModelProperty(value = "手机", required = true)
    private String phone;
}
